﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Frogs.Stability.CircuitBreaker
{
    /// <summary>
    /// Base definition of a Circuit Breaker
    /// </summary>
    public interface ICircuitBreaker
    {
        /// <summary>
        /// Reset the state of the circuit breaker to closed
        /// </summary>
        void ResetCircuit();

        /// <summary>
        /// Trips the circuit breaker, setting the status to open
        /// </summary>
        void TripCircuit();

        /// <summary>
        /// Gets the state of the circuit breaker
        /// </summary>
        /// <returns></returns>
        CircuitState QueryState();
    }
}
